function DetailFeedbackView() {
	this.parent();
}

function onclickUpdateFeedback() {
	var id = this.ctrl.model.feedbacks.feedbackId;
	var isReaded = this.ctrl.model.feedbacks.isReaded;
	if (isreaded == "true") {
		updateFeedback(id);
	};
	callFeedbackService();
}

DetailFeedbackView.inherits(BaseView, {
	init : function() {
		var data = this.ctrl.model.feedbacks;
		this.createDetailFeedbackView(data);
	},

	createDetailFeedbackView : function(data) {
		var id = data.feedbackId;
		$id("txtFeedbackId").value = id;
		$id("txtFeedbackOwner").value = data.email;
		$id("txtFeedbackTitle").value = data.title;
		$id("txtFeedbackContents").value = data.content;
		$id("txtFeedbackCreateTime").value = data.createTime;

		$id("btnUpdateFeedback").onclick = function() {
			callFeedbackService();
			// var isReaded = data.isReaded;
			// if (isReaded == "true") {
			// updateFeedback(id);
			// } else {
			//
			// }
		}
	}
});
